package sample.test.adv{
	import com.takanafu.haruframework.aopalliance.reflect.Method;
	import mx.collections.ArrayCollection;
	import com.takanafu.haruframework.aop.MethodBeforeAdvice;
	import com.takanafu.haruframework.aop.AfterReturningAdvice;
	import com.takanafu.haruframework.aop.reflect.MethodImpl;
	import com.takanafu.haruframework.d2l.invoker.MethodInfo;
	import sample.test.ConsoleManager;
	import com.takanafu.haruframework.d2l.util.ApplicationContext;

	public class QueryInterceptor2 implements MethodBeforeAdvice, AfterReturningAdvice{
		private var cm:ConsoleManager;
		
		function QueryInterceptor2(){
			cm = ApplicationContext.getBean("consoleManager") as ConsoleManager;
		}

		public function before(m:Method, args:ArrayCollection, target:Object):MethodInfo{
			cm.println("QueryInterceptor2:before");
			
			return null;
		}
		
		public function afterReturning(returnValue:Object, m:Method, args:ArrayCollection, target:Object):MethodInfo{
			cm.println("QueryInterceptor2:afterReturning");
			
			return null;
		}
		
	}
}